<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <title>点评</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">
		<link rel="stylesheet" href="__JS__/kindeditor/themes/default/default.css" />
		<link rel="stylesheet" href="__JS__/kindeditor/plugins/code/prettify.css" />
		<script charset="utf-8" src="__JS__/kindeditor/kindeditor.js"></script>
		<script charset="utf-8" src="__JS__/kindeditor/lang/zh_CN.js"></script>
		<script charset="utf-8" src="__JS__/kindeditor/plugins/code/prettify.js"></script> 
		<script>
			KindEditor.ready(function(K) {
				var editor1 = K.create('textarea[name="text"]', {
					cssPath : '__JS__/kindeditor/plugins/code/prettify.css',
					uploadJson : '__JS__/kindeditor/php/upload_json.php?no=<?php echo ($no); ?>',
					fileManagerJson : '__JS__/kindeditor/php/file_manager_json.php?no=<?php echo ($no); ?>',
					allowFileManager : true,
					afterCreate : function() {
						var self = this;
						K.ctrl(document, 13, function() {
							self.sync();
							K('form[name=discuss]')[0].submit();
						});
						K.ctrl(self.edit.doc, 13, function() {
							self.sync();
							K('form[name=discuss]')[0].submit();
						});
					}
				});
				prettyPrint();
			});
		</script>
		<script type="text/javascript" src="__JS__/jshelper.js"></script> 
		<script type="text/javascript" src="__JS__/jQuery/jquery.js"></script>
       	<script type="text/javascript" src="__JS__/jQuery/jquery.form.js"></script>
       	<script>
		  $(function(){
           $('#form1').ajaxForm({
				//beforeSubmit:  function(){alert("before");},  // pre-submit callback
				success:       complete,  // post-submit callback
				error:function(){alert("error");},
				dataType: 'json'
			});
           
			function complete(data){
			if (data.status==1)
			{
				window.location='__APP__/user/workdetail/id/<?php echo ($vo["classid"]); ?>/p/<?php echo ($vo["saveid"]); ?>';
             }else{
				$('#result').html(data.info).show();
             }
		}
	});
	</script>
</head>
<body>
	<!-- layout::Auth:header::0 -->
    		<div class="container-fluid">
     			<div class="row-fluid">
        			<!-- layout::Auth:leftmenu::0 -->
                    	<div class="span8">
                          <div class="hero-unit">
                            <h1>点评</h1>
                            <p style="font-size:12px">当前位置：
                                <a href='__APP__/index/index' class="nowpositionhref">主页</a>>
                                <a href='__URL__/index' class="nowpositionhref">后台管理</a>>
                                <a href='__URL__/classdetail' class="nowpositionhref">教学班管理</a>>
                                <a href='__URL__/classfile/id/<?php echo ($classid); ?>' class="nowpositionhref">学生管理</a>>
                                <a href="" class="nowpositionhref" >作业管理</a>>
                                <a href=""  class="nowpositionhref">点评</a>
                             </p>
                           </div>

                                <form id='form1' name="discuss" method="post" action="__URL__/workremark" >
                                    <div id='result' style="color:red; font-size:12px;"></div>
                                    <input type='hidden' name='id' value=<?php echo ($vo["id"]); ?>>
                                    <input type='hidden' name='name' value=<?php echo ($vo["name"]); ?>>
                                    <input type='hidden' name='no' value=<?php echo ($vo["no"]); ?>>
                                    <input type='hidden' name='time' value=<?php echo ($vo["time"]); ?>>
                                    <input type='hidden' name='path' value=<?php echo ($vo["path"]); ?>>
                                    <input type='hidden' name='size' value=<?php echo ($vo["size"]); ?>>
                                    <input type='hidden' name='savename' value=<?php echo ($vo["savename"]); ?>>
                                    <input type='hidden' name='classid' value=<?php echo ($vo["classid"]); ?>>
                                    <input type='hidden' name='nname' value=<?php echo ($vo["nname"]); ?>>
                                    <input type='hidden' name='saveid' value=<?php echo ($vo["saveid"]); ?>>
                                    
                                    <input type='text' name='grade' value="打分：<?php echo ($vo["grade"]); ?>">
                                    <textarea name="text" style="width:100%;hight:20%;"><?php echo ($vo["text"]); ?></textarea>
                                    <br>
                                    <input name="submit" type="submit" value="发表" style="width:80px;" >
                                </form>
                             </div>
                           </div>
                         </div>
</div>
</body>
</html>